package com.gin.kotlin.gf2gamecommunity.base.composable

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.dp

/**
 * 默认带边框的卡片
 * @param shape Shape
 * @param border BorderStroke?
 * @param modifier Modifier
 * @param content ColumnScope.() -> Unit
 */
@Composable
fun BorderCard(
    shape: Shape = RoundedCornerShape(16.dp),
    border: BorderStroke? = BorderStroke(2.dp, CardDefaults.cardColors().disabledContentColor),
    modifier: Modifier = Modifier,
    content: @Composable() (ColumnScope.() -> Unit)
) {
    Card(
        shape = shape,
        border = border,
        content = content,
        modifier = modifier,
    )
}